package com.jxpanda.spring.module.wechat.component.http.base.constant;

import com.jxpanda.spring.module.wechat.component.http.base.WechatApi;
import lombok.Getter;

/**
 * 开放平台接口地址
 *
 * @author Panda
 */
public class OpenPlatformApi {

    /**
     * 开放平台应用，登录接口-获取access_token
     * 文档地址：<a href="https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Authorized_Interface_Calling_UnionID.html">获取access_token</a>
     */
    public static final WechatApi<?, ?, ?> ACCESS_TOKEN = new WechatApi<>() {
        @Getter
        private final String url = "https://api.weixin.qq.com/sns/oauth2/access_token";
    };

    /**
     * 刷新access_token
     * 文档地址：<a href="https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Authorized_Interface_Calling_UnionID.html">刷新access_token</a>
     */
    public static final WechatApi<?, ?, ?> REFRESH_TOKEN = new WechatApi<>() {
        @Getter
        private final String url = "https://api.weixin.qq.com/sns/oauth2/refresh_token";
    };

    /**
     * 获取用户信息
     * 文档地址：<a href="https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Authorized_Interface_Calling_UnionID.html">获取用户信息</a>
     */
    public static final WechatApi<?, ?, ?> USER_INFO = new WechatApi<>() {
        @Getter
        private final String url = "https://api.weixin.qq.com/sns/userinfo";
    };

}
